<template>
	<view class="header">
		<view class="item" v-for="(value,index) in iconType" :key="index">
		    <icon :type="value" size="20" color="#CCCCCC"/>
			<text>为了提高发货速度，请填写您的真实姓名</text>
		</view>
	</view>
	<view class="content">
		<input type="text" value="" placeholder="张小五"/>
		<input type="text" value="" placeholder="13092839482"/>
		<text>北京</text>
		<text>北京市</text>
		<text>昌平区</text>
	</view>
	<view class="last">
		<text>西二旗东路10号院11号楼</text>
		<view>
				<view class="uni-padding-wrap">
					<view class="uni-title"></view>
					<view>
						<label class="radio"><radio value="r1" style="margin: 10px;"/>设为默认地址</label>
					</view>
				</view>
			</view>
	</view>
	<view class="baocun">
		<button type="default" @click="save">保存</button>
		<button type="default" @click="del">删除</button>
	</view>
</template>

<script>
export default {
    data() {
        return {
			iconType: ['success'],
			save(){
				uni.showModal({
					title: '提示',
					content: '你确定要保存吗？',
					success: function (res) {
						if (res.confirm) {
							console.log('用户点击确定');
							uni.navigateTo({
								url:'./sh_address'
							})
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
			},
			
			del(){
				uni.showModal({
					title: '提示',
					content: '你确定要删除吗？',
					success: function (res) {
						if (res.confirm) {
							console.log('用户点击确定');
							uni.navigateTo({
								url:'./sh_address'
							})
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
			}
        }
		
		
    },
	  onLoad() {
	        this.iconType = ['warn']
	    },
    methods: {
    }
}
</script>

<style lang="less" scoped>
	.header{
		display: flex;
		padding: 10px;
		border: 1px solid #F2F2F2;
		background-color: #FAFAFA;
		text{
			font-size: 14px;
			 margin: 0 10px;
		}
		.item{
		    icon{
				
			}
		}
	}
	.content{
		margin: 10px;
		input{
			height: 50px;
			margin: 10px 0;
			border-bottom: 1px solid #F2F2F2;
		}
		:nth-child(3){
			margin: 0 5px;
		}
		:nth-child(4){
			margin: 0 100px;
		}
	}
	.baocun{
		border-radius: 15px;
		color: #CCCCCC;
		justify-content: center;
		button{
			margin: 20px;
			border-radius: 15px;
			border: 1px solid #2E2E2E;
		}
		button:first-child{
			color: #FFFFFF;
			background-color: #CCCCCC;
		}
		button:last-child{
			background-color: #FFFFFF;
		}
	}
		.text {
			font-size: 12px;
			color: #666;
			margin-top: 5px;
		}
		.uni-px-5 {
		    padding-left: 10px;
		    padding-right: 10px;
		}
		.uni-pb-5 {
		    padding-bottom: 10px;
		}
		.last{
			display: flex;
			flex-direction: column;
			text{
				margin: 10px;
				font-size: 14px;
				border-bottom: 1px solid #F2F2F2;
			}
		}
</style>
